package com.zhongkai.encryptSHA;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class EncryptSHA {

	private MessageDigest mMessageDigest = null;

	public EncryptSHA( ) throws NoSuchAlgorithmException {
		mMessageDigest = MessageDigest.getInstance( "SHA" );
	}

	public byte[] Encrypt( byte[] src ) {
		mMessageDigest.update( src );
		return mMessageDigest.digest( );
	}
}
